<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    

<div class="sub-content">	
	<a href="${pageContext.request.contextPath}/employee">Danh sách</a> 
	<c:url var="action" value="/employee/confirm"></c:url>	
	<div style="margin-top: 10px">	
		<form:form method="post" action="${action}" commandName="obj">
			<div style="float: left;">	
				<%-- Process image dialogUpdateImage() --%>	
				<div style="width: 155px">
					<a href="#" onclick="dialogUpdateImage()">
						<form:hidden path="image" />
						<img id="imageShow" src="data:image/png;base64,${obj.image}" alt="IMG DESC" width="150px" height="200px">
					</a>
				</div>
				<%-- Process image --%>	
			</div>
			<div style="float: left;">
				<h3><span class="mark-title"></span></h3>
				<div><form:errors path="*" cssClass="error" /></div>
				<form:hidden path="empId" cssClass="mark-id"/>
				<table>
					<tr>
						<td class="column1">Tên nhân viên:<span class="req-field"></span></td>
						<td><form:input path="empName" cssClass="${empName}"/></td>
					</tr>
					<tr>
						<td class="column1">Điện thoại:<span class="req-field"></span></td>
						<td><form:input path="empPhone" cssClass="${empPhone}"/></td>
					</tr>					
					<tr>
						<td class="column1">Email:<span class="req-field"></span></td>
						<td><form:input path="empMail" cssClass="${empMail}"/></td>
					</tr>
					<tr>
						<td class="column1">Thành phố:</td>
						<td><select name="cityId.cityId">
							<c:forEach items="${cities}" var="item">
								<c:choose>
									<c:when test="${obj.cityId.cityId == item.cityId}">
										<option value="${item.cityId}" selected="selected">${item.cityName}</option>
									</c:when>
									<c:otherwise>
										<option value="${item.cityId}">${item.cityName}</option>
									</c:otherwise>
								</c:choose>
								
							</c:forEach>
						</select>
					</tr>
					<tr><td></td><td><input type="submit" value="Lưu" /></td></tr>							
				</table>
			</div>
		</form:form>		
	</div>
</div>	


